#include<stdio.h>
int main()
{
 double s=0,t=0;
 int n1=0,n2=0;
 double m1=0,m2=0,m=0;
 scanf("%lf %lf",&s,&t);
 n1=(s-3)/0.5+1;
 n2=t/5;
 if(s<3)
    {
    printf("10.00");
    }
 if(s>=3)
    {
     m1=n1*0.9+10;
     m2=n2*0.9;
    m=m1+m2;
    printf("%.2lf",m);
    
    }
return 0;
}